
package kgame5.kio {
import kgame5.kutil.*;

import flash.net.*;

public class RecordStore{
	private static var so:SharedObject;
	public function RecordStore(){
	}
	
	public static function open(sName:String):void{
		T.p("RecordStore.open",sName);
		so=SharedObject.getLocal(sName);//当用户禁用第三方共享对象，swf域与地址栏域不同时则返回null
	} 
	public static function getData(sKey:String):Object{
		if(so!=null){
			return so.data[sKey];
		}else{
			return null;
		}
	}
	public static function setData(sKey:String,value):void{
		if(so!=null){
			so.data[sKey]=value;
		}
	}
}//end of class
}